package com.example.educms.controller;


import com.example.educms.entity.CrmBanner;
import com.example.educms.service.CrmBannerService;
import com.example.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author xiuxian
 * @since 2022-06-30
 */


//前台系统的接口
//@CrossOrigin  //跨域
@RestController
@RequestMapping("/educms/bannerFront")
public class CrmBannerFrontController {

    @Autowired
    private CrmBannerService crmBannerService;

    //查询所有banner方法
    @GetMapping("/getlistbanner")
    public R getListBanner(){

       List<CrmBanner> list=crmBannerService.selectAllBanner();
        return  R.ok().data("list",list);
    }

}

